import { request } from '@/service/request';

/** 获取微信支付配置列表 */
export function fetchGetSingleTransferList(params?: Api.Business.SingleTransferSearchParams) {
  return request<Api.Business.SingleTransferList>({
    url: '/single_transfer_config/getAll',
    method: 'post',
    data: params
  });
}

/** 新增微信支付配置 */
export function fetchCreateSingleTransfer(data: Api.Business.SingleTransferOperateParams) {
  return request<boolean>({
    url: '/single_transfer_config/add',
    method: 'post',
    headers: {
      isEncrypt: true,
      repeatSubmit: false
    },
    data
  });
}

/** 修改微信支付配置 */
export function fetchUpdateSingleTransfer(data: Api.Business.SingleTransferOperateParams) {
  return request<boolean>({
    url: '/single_transfer_config/update',
    method: 'post',
    data
  });
}
